﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;


namespace WPFSchematics.Definition.Entities
{

    public abstract class Entity : DependencyObject, IEntity
    {

        #region IEntity 成员

        /// <summary>
        /// 
        /// </summary>
        public static readonly DependencyProperty IndexProperty = DependencyProperty.Register(
        "Index",
        typeof(int),
        typeof(Entity)
        );

        /// <summary>
        /// 
        /// </summary>
        public int Index
        {
            get { return (int)GetValue(IndexProperty); }
            set { SetValue(IndexProperty, value); }
        }

        public static readonly DependencyProperty NamingProperty = DependencyProperty.Register(
        "Naming",
        typeof(Naming),
        typeof(Entity)
        );

        /// <summary>
        /// 标识说明。
        /// </summary>
        public Naming Naming
        {
            get
            {
                return (Naming)GetValue(NamingProperty);
            }
            set
            {
                SetValue(NamingProperty, value);
            }
        }

        public static readonly DependencyProperty TagProperty = DependencyProperty.Register(
        "Tag",
        typeof(object),
        typeof(Entity)
        );

        /// <summary>
        /// 标识说明。
        /// </summary>
        public object Tag
        {
            get
            {
                return GetValue(TagProperty);
            }
            set
            {
                SetValue(TagProperty, value);
            }
        }

        public Entity()
        {
            SetValue(NamingProperty, new Naming());
        }
        #endregion


    }
}
